fixes edge cases in Android Native App rendering#32
fixes edge cases in Android Native App rendering#32mgood7123 wants to merge 1 commit intoDiligentGraphics:masterfrom
Conversation
There was a problem hiding this comment.
What is this for? Nothing waits on this conditional
There was a problem hiding this comment.
It is better to use std::mutex
There was a problem hiding this comment.
ok, though i think std::mutex is slightly slower than pthread_mutex in terms of overhead, but i will switch to std::mutex
There was a problem hiding this comment.
No need for NV_ prefix
There was a problem hiding this comment.
lifecycle_flags_ to be consistent with the rest
There was a problem hiding this comment.
No need to initialize if you use std::mutex
There was a problem hiding this comment.
Why is it an error?
There was a problem hiding this comment.
to make it stand out in the log as it is important for seeing what is going on with the state of the native app internally when debugging the state, since errors have red text in logcat
There was a problem hiding this comment.
to make it stand out in the log as it is important for seeing what is going on with the state of the native app internally when debugging the state, since errors have red text in logcat
There was a problem hiding this comment.
std::lock_guard lock{mutex}; here and in similar places
TheMostDiligent
left a comment
There was a problem hiding this comment.
There are 11 commits in this branch already. Please squash them into one.
There was a problem hiding this comment.
APP_STATUS_FLAGS app_status_ = APP_STATUS_FLAG_NONE
There was a problem hiding this comment.
"Errors.hpp", this is not a system header
There was a problem hiding this comment.
I suggest give it a name (e.g. APP_STATUS_FLAGS) and use DEFINE_FLAG_ENUM_OPERATORS(APP_STATUS_FLAGS)
There was a problem hiding this comment.
Why extra message?
There was a problem hiding this comment.
Why extra message?
There was a problem hiding this comment.
Why extra message?
There was a problem hiding this comment.
Why extra message?
There was a problem hiding this comment.
This does not look pretty.
(app_status_ & APP_STATUS_FLAG_ACTIVE) != APP_STATUS_FLAG_NONE
Would be clearer
is it possible to do this via github.com or would i manually need to do some |
|
You can force-push to the PR branch |
ok |
be09133 to
96ead7d
Compare
|
apparently force pushing a branch with no changes closes the pull request... |
58a9e7e to
2d43095
Compare
There was a problem hiding this comment.
I actually think it makes sense to always log this - there is really no reason not to...
Same for other places.
There was a problem hiding this comment.
so this?
case APP_CMD_INIT_WINDOW:
LOG_INFO_MESSAGE("APP_CMD_INIT_WINDOW");There was a problem hiding this comment.
logging of all events
60f08d8 to
3d76fb8
Compare
|
is this better? |
67c0830 to
e09d30c
Compare
There was a problem hiding this comment.
this variable is unused, i need to remove it when i have time
There was a problem hiding this comment.
this variable is unused, i need to remove it when i have time
Squashed commit of the following: commit ba7271f Author: mgood7123 <smallville7123@gmail.com> Date: Sat Jul 3 03:12:45 2021 +1000 use std::atomic instead of std::mutex commit 54e3973 Author: mgood7123 <smallville7123@gmail.com> Date: Tue Jun 29 07:52:35 2021 +1000 fixes edge cases in Android Native App rendering Revert "fix possible rendering edge cases" This reverts commit 3d76fb8. fix possible rendering edge cases Update AndroidMain.cpp add functions for app status apply validator suggestions Update AndroidAppBase.hpp Update AndroidAppBase.cpp remove unused variables
adapted from https://github.com/151706061/OpenGLSamples/blob/1e871c0c7fe0d8d30825f467bfdc8de50961b6f9/extensions/src/NvAppBase/NvAndroidNativeAppGlue.c#L128
this fixes possible rendering edge cases mentioned in https://developer.nvidia.com/fixing-common-android-lifecycle-issues-games